<?php
final class Simpple_AutoLoader {
	private static $autoLoader;
	public static function run() {
		if (!self::$autoLoader) {
			self::$autoLoader = new Simpple_AutoLoader();
		}
	}
	private function __construct() {
		spl_autoload_register(array($this, 'loader'));
	}
	
	/**
	 * 自动载入类
	 *
	 * @param string $class
	 */
	protected function loader($class) {
		$path = str_replace('_', '/', $class).'.php';
		return @include $path;
	}
}